# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=latte-dock
pkgver=0.10.9
pkgrel=2
# armhf blocked by extra-cmake-modules
# ppc64le blocked by kaccounts-integration -> plasma-desktop
arch="all !armhf !ppc64le"
url="https://store.kde.org/p/1169519/"
pkgdesc="A dock based on Plasma Frameworks"
license="LGPL-2.0-or-later AND GPL-2.0-or-later"
depends="kactivities5"
makedepends="
	extra-cmake-modules
	kactivities5-dev
	karchive5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdeclarative5-dev
	kglobalaccel5-dev
	kguiaddons5-dev
	ki18n5-dev
	kiconthemes5-dev
	knewstuff5-dev
	knotifications5-dev
	kwayland5-dev
	kwindowsystem5-dev
	kxmlgui5-dev
	libksysguard-dev
	plasma-framework5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	xcb-util-dev
	"
source="https://download.kde.org/stable/latte-dock/latte-dock-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
85ba2884cbdf98dab39110baf579cbf6ddfd31d6c263ddaad948f6b61fbe5a41ebccc00bf5bc76833228e0b5aab26988a2e8a5c06b3a34c3400fed74bae560c7  latte-dock-0.10.9.tar.xz
"
